#define _CRT_SECURE_NO_WARNINGS 1
//#include <stdio.h>
//#include<string.h>
//void fun(char* ar1, char* ar2)
//{
//    int ret = 0;
//    int i = 0;
//    while (ar1[i] != '\0' || ar2[i] != '\0')
//    {
//        ret = ar1[i] - ar2[i] + ret;
//        i++;
//    }
//    printf("%d", ret);
//}
//int main ()
//{
//    char arr1[20] = { 0 };
//    char arr2[20] = { 0 };
//    scanf("%s%s", &arr1,&arr2);
//    fun(arr1, arr2);
//    return 0;
//}
#include<stdio.h>
int main()
{
    char arr1[20] = { 0 };
    char arr2[20] = { 0 };
    scanf("%s", &arr1);
    getchar();
    char ch = 0;
    scanf("%c", &ch);
    int i = 0, j = 0;
    while (arr1[i] != '\0')
    {
        if (arr1[i] != ch)
        {
            arr2[j++] = arr1[i];
        }
        i++;
    }
    printf("%s", arr2);
    return 0;
}